package com.server.questionbank.snframe.service.CourseService.Impl;


import com.server.questionbank.snframe.domain.Course.Type.CourseDifficulty;
import com.server.questionbank.snframe.domain.Course.Type.CourseLabel;
import com.server.questionbank.snframe.domain.Course.Type.CourseType;
import com.server.questionbank.snframe.mapper.Course.Type.CourseDifficultyMapper;
import com.server.questionbank.snframe.mapper.Course.Type.CourseLabelMapper;
import com.server.questionbank.snframe.mapper.Course.Type.CourseTypeMapper;
import com.server.questionbank.snframe.service.CourseService.CourseTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseTypeServiceImpl implements CourseTypeService {

    @Autowired
    private CourseTypeMapper courseTypeMapping;
    @Autowired
    private CourseLabelMapper courseLabelMapper;
    @Autowired
    private CourseDifficultyMapper courseDifficultyMapper;

    //获取所有课程类型
    @Override
    public List<CourseType> getAllCourseType() {
        return courseTypeMapping.getAllCourseType();
    }

    // 根据课程类型id列表获取课程标签
    @Override
    public List<CourseLabel> getCourseLabelByTypeIdList(List<Long> typeIdList) {
        return courseLabelMapper.getCourseLabelByTypeIdList(typeIdList);
    }

    // 获取课程难度
    @Override
    public List<CourseDifficulty> getCourseDifficulty(Long difficultyId) {
        return courseDifficultyMapper.getCourseDifficulty(difficultyId);
    }
}
